<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* css属性选择器  */
    [v-cloak]{ 
      display: none;
    }
  </style>
</head>
<body>
<div  id="app">
    <div>
        {{msg}}
    </div>
    <!-- v-pre 显示源代码 -->
    <div v-pre>
        {{msg}}
    </div>
    <!-- v-once 数据只能渲染一次 -->
    <button @click="add" v-once>{{n}}</button>
    <!-- v-clock 解决代码闪现的问题 -->
    <div v-clock>{{msg}}</div>


</div>

</body>
<script src="../../lib/vue.global.js"></script>
<script>
    Vue.createApp({
        data(){
            return {
                msg:"ahsdgb",
                n:1
            }
        },
        methods:{
            add(){
                this.n++
            }
        }
    }).mount("#app")
  
</script>
</html>